<!DOCTYPE html>
<html>
	{include file="head.html"}
	<body class="bg-ef">
		<div class="tabs-border">
			<div>{$table.title}:{$table.tablename}</div>
			<a href="?m=table_data&tableid={$table.tableid}" class="item active">数据列表</a>
			<a href="?m=table_data&a=add&tableid={$table.tableid}" class="item">发布</a>
			<a href="?m=table_fields&a=table&tableid={$table.tableid}" class="item">表设计</a>
			
		</div>
		<div class="main-body ">
			<div class="list ">
				{foreach item=rs from=$list}
				<div class="row-box mgb-5 js-item">
					 
					{foreach item=c from=$rs.data}
						{if $c.fieldtype=='text'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1">{$c.value}</div>					
						</div>
						{elseif $c.fieldtype=='textarea'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1">
								{$c.value}
							</div>					
						</div>
						{elseif $c.fieldtype=='select'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1">{$c.value}</div>					
						</div>
						{elseif $c.fieldtype=='html'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1">
								{$c.value}
							</div>					
						</div>
						{elseif $c.fieldtype=='img'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1">
								<img src="{$c.value}.100x100.jpg" class="w60" />
							</div>					
						</div>
						{elseif $c.fieldtype=='map'}
						<div class="flex bd-mp-10 flex-ai-center">
							<div class="w100">{$c.title}</div>
							<div class="flex-1 flex">
								<img class="wmax" src="http://api.map.baidu.com/staticimage/v2?ak={const.BDMAPKEY}&mcode=666666&center={$c.value}&markers={$c.value}&width=300&height=200&zoom=11 " class="w60" />
							</div>					
						</div>
						{/if}
					{/foreach}
					<div class="flex">
						<a href="?m=table_data&a=add&id={$rs.id}&tableid={$rs.tableid}" class="btn-small mgr-20">编辑</a>
						<div class="btn-small mgr-20 btn-warning js-delete" url="?m=table_data&a=delete&ajax=1&id={$rs.id}">删除</div>
						<div >调用 id:{$rs.id}</div>
					</div>
				</div>	
				{/foreach}
			</div>
		</div>
		{include file="footer.html"}
	</body>
</html>
